package org.jage.student.missevo.solution.reproduction;

import org.jage.agent.IAgentEnvironment;
import org.jage.platform.component.annotation.Inject;
import org.jage.property.ClassPropertyContainer;
import org.jage.property.IPropertiesSet;
import org.jage.property.PropertyField;

public class PercentEnergyPassing extends ClassPropertyContainer implements IEnergyPassing {
	
	@PropertyField(propertyName = "passedFraction")
	@Inject
	private double passedFraction;
	
	@Override
	public double computeEnergyToPass(IAgentEnvironment agentEnvironment, IPropertiesSet agentProperties) {
		return ((Double)agentProperties.getProperty("energy").getValue())*passedFraction;
	}
	
}
